package ru.niir.goodfil.db;

import org.hibernate.validator.NotEmpty;

import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Column;
import javax.persistence.Id;
import java.io.Serializable;

@Entity
@Table(name = "`Oes`")
public class GoodOe implements Serializable
{
    @Id
    @Column(name = "`Oe`")
    @NotEmpty
    private String oe;

    @Column(name = "`GoodCode`")
    @NotEmpty
    private String goodCode;

    public String getOe()
    {
        return oe;
    }

    public void setOe(String oe)
    {
        this.oe = oe;
    }

    public String getGoodCode()
    {
        return goodCode;
    }

    public void setGoodCode(String goodCode)
    {
        this.goodCode = goodCode;
    }

    public static GoodOe create(String oe, String goodCode)
    {
        GoodOe goodOe = new GoodOe();
        goodOe.setOe(oe);
        goodOe.setGoodCode(goodCode);
        return goodOe;
    }
}
